how to extract features from an image using cnn